package cn.wolfcode.util;

import lombok.Getter;
import lombok.NoArgsConstructor;


@Getter
public enum  BusinessReportEnum {
    CONSUME("门店" , "b.name"),
    AUDIT("年" , "DATE_FORMAT(c.create_time,'%Y')"),
    FINISH("月","DATE_FORMAT(c.create_time,'%Y-%m')"),
    FAILURE("日","DATE_FORMAT(c.create_time,'%Y-%m-%d')");


    public String name;
    public String value;

    BusinessReportEnum(String name, String value) {
        this.name = name;
        this.value = value;
    }

    public static String findName(String name){
        BusinessReportEnum[] values = values();
        for (BusinessReportEnum enums : values) {
            if(enums.name == name){
                return enums.name;
            }
        }
        return null;
    }
}
